package cn.stylefeng.guns.modular.business.mapper;

import cn.stylefeng.guns.modular.business.entity.UserTransactionLog;
import cn.stylefeng.guns.modular.business.model.dto.TransactionLogDTO;
import cn.stylefeng.guns.modular.business.model.params.UserTransactionLogParam;
import cn.stylefeng.guns.modular.business.model.result.UserTransactionLogResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户交易记录 Mapper 接口
 * </p>
 *
 * @author pzp
 * @since 2019-08-03
 */
public interface UserTransactionLogMapper extends BaseMapper<UserTransactionLog> {

    /**
     * 获取列表
     *
     * @author pzp
     * @Date 2019-08-03
     */
    List<UserTransactionLogResult> customList(@Param("paramCondition") UserTransactionLogParam paramCondition);

    /**
     * 获取map列表
     *
     * @author pzp
     * @Date 2019-08-03
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") UserTransactionLogParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author pzp
     * @Date 2019-08-03
     */
    Page<UserTransactionLogResult> customPageList(@Param("page") Page page, @Param("type") String type,@Param("payMode")String payMode,@Param("state")String state,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    /**
     * 获取分页实体列表
     *
     * @author pzp
     * @Date 2019-08-03
     */
    Page<UserTransactionLogResult> record(@Param("page") Page page,@Param("transactionLogDTO") TransactionLogDTO transactionLogDTO);

    /**
     * 获取分页map列表
     *
     * @author pzp
     * @Date 2019-08-03
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") UserTransactionLogParam paramCondition);

    /**
     * 获取微信提现金额
     * @param userId
     * @param date
     * @return
     */
    BigDecimal amountByWechat(@Param("userId") Long userId,@Param("date") String date);
}
